/*
 Navicat Premium Data Transfer

 Source Server         : cangqiong
 Source Server Type    : MySQL
 Source Server Version : 80403 (8.4.3)
 Source Host           : localhost:3306
 Source Schema         : taxi-service-price

 Target Server Type    : MySQL
 Target Server Version : 80403 (8.4.3)
 File Encoding         : 65001

 Date: 30/05/2025 17:10:18
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for price_rule
-- ----------------------------
DROP TABLE IF EXISTS `price_rule`;
CREATE TABLE `price_rule` (
  `city_code` char(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '城市代码',
  `vehicle_type` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '车辆类型',
  `start_fare` double(4,2) DEFAULT NULL COMMENT '起步价',
  `start_mile` int DEFAULT NULL,
  `unit_price_per_mile` double(4,2) DEFAULT NULL,
  `unit_price_per_minute` double(4,2) DEFAULT NULL,
  `fare_version` int NOT NULL,
  `fare_type` varchar(16) DEFAULT NULL,
  PRIMARY KEY (`city_code`,`vehicle_type`,`fare_version`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of price_rule
-- ----------------------------
BEGIN;
INSERT INTO `price_rule` (`city_code`, `vehicle_type`, `start_fare`, `start_mile`, `unit_price_per_mile`, `unit_price_per_minute`, `fare_version`, `fare_type`) VALUES ('110000', '1', 12.10, 2, 12.10, 12.20, 1, '110000$1');
INSERT INTO `price_rule` (`city_code`, `vehicle_type`, `start_fare`, `start_mile`, `unit_price_per_mile`, `unit_price_per_minute`, `fare_version`, `fare_type`) VALUES ('110000', '1', 10.00, 5, 4.00, 0.05, 2, '110000$1');
INSERT INTO `price_rule` (`city_code`, `vehicle_type`, `start_fare`, `start_mile`, `unit_price_per_mile`, `unit_price_per_minute`, `fare_version`, `fare_type`) VALUES ('110001', '1', 12.10, 2, 12.10, 12.20, 1, '110001$1');
INSERT INTO `price_rule` (`city_code`, `vehicle_type`, `start_fare`, `start_mile`, `unit_price_per_mile`, `unit_price_per_minute`, `fare_version`, `fare_type`) VALUES ('110001', '1', 10.00, 5, 4.00, 0.05, 2, '110001$1');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
